A sector is a subdivision of a track on a magnetic or optical hard disk drive (also referred to as “disk”). Each sector stores a fixed amount of data. Traditionally, each sector is formatted to store 512 bytes of data. With the advance of disk technology, a new standard has been widely adopted to store 4K bytes (i.e., 4096 bytes) in a sector.
Many older versions of operating systems still assume that disks are configured to have 512-byte sectors; e.g., Red Hat® enterprise Linux (RHEL®) version 4, Windows® XP, Windows® 2003, etc. These operating systems can issue a write command that records new data on the disk at a location not aligned to the sector boundary of a disk that uses the new standard. With these operating systems, writing even a single byte to a disk sector can cause the entire sector to be read and rewritten. For example, when writing to a part of a sector on a disk having 4K-byte sectors, an entire 4K-byte sector containing the targeted location is read out and modified by the new data. Then the entire 4K-byte is rewritten onto the disk. This operation, known as Read-Modify-Write (RMW), is costly and can result in significant degradation to disk performance.
To align write locations to the sector boundary, some newer versions of operating systems (e.g., RHEL® version 5, Windows® Vista, etc.) use multiple partition tables that have different layouts for different disks. In a virtualization system, a guest operating system (OS) uses a disk image and not a physical disk. The host OS usually knows what the right alignment for the disk image is, and can pass the information to the guest OS. The guest OS can then consult an appropriate partition table and use an appropriate disk layout in its write requests. However, this approach generally works with newer versions of guest operating systems. Older versions of guest operating systems are not aware of the misalignment problem and often issue write requests to locations that do not align with the disk sector boundaries.